<ul id="${id}" name="${id}" style="padding: 0;width: 100%;font-size: 16px">
    @for(item in list){
    <div style="display: none">
        <p style="font-size: 22px;font-weight: bold;padding-left: 10px"
           value="${item.getTime}">${item.getTime}</p>
    </div>
    <li value="${item.customerId}">
        <p style="font-size: 22px;font-weight: bold;"
           value="${item.operationTime}">${item.operationTime}</p>
        <div value="${item.operationTime}"></div>
    </li>
    <script>
        $.ajax({
            url: Feng.ctxPath + "/consultant/getOpenBillListd",
            type: "post",
            data: {
                "operationTime": $("p[value='${item.operationTime}']").text(),
                "customerId": $("#customerId").val(),
                "getTime":  $("p[value='${item.getTime}']").text(),
                "reservationsId": $("#reservationsId").val(),
                "filterMoney":"1"
            },
            success: function (data) {
                var serviceActualPay2=0.00;
                var accountArrears2=0.00;
                var s1 = '';
                var ss = "";
                var sss = "";
                var str = "";
                for (var i = 0; i < data.length; i++) {
                    serviceActualPay2 += parseFloat(data[i].serviceActualPay);
                    accountArrears2 += parseFloat(data[i].accountArrears);

                    ss += ' <div class="data_row" style="margin-top: 5px;">' +
                        '<div style="width: 120px;display: inline-block;vertical-align:middle;margin-right: 20px;">' +
                        '<div style="border-bottom: 1px solid;">' +
                        '<div style="font-size: 12px;display: inline-block;width:55px;border-right: 1px solid black;text-align: right;height: 22px;margin-bottom: -5px;"  id="yw_left_top">' + data[i].leftUp + '</div>' +
                        '<div style="font-size: 12px;display: inline-block;width:55px;" id=\"yw_right_top">' + data[i].rightUp + '</div>' +
                        '</div>' +
                        '<div>' +
                        '<div style="font-size: 12px;display: inline-block;width:55px;border-right: 1px solid black;text-align: right;height: 22px;margin-bottom: -5px;" id="yw_left_bottom">' + data[i].leftDown + '</div>' +
                        '<div style="font-size: 12px;display: inline-block;width:55px;" id=\"yw_right_bottom">' + data[i].rightDown + '</div>' +
                        '</div>' +
                        '</div>' +  //'' + data[i].department + '&nbsp&nbsp' + data[i].firstLevelProject + '' +

                        '<span style="display: inline-block;width: 25%;">'+ data[i].payServiceName +'</span><span style="margin-right: 20px;">'+ data[i].payServiceNum +'</span><span style="font-weight: bold;font-size: 18px;display: inline-block;width: 8%">' + data[i].payService.toFixed(2) + '元</span>' +
                        '<span style="display: inline-block;width: 9%;">医生：'+data[i].doctor+'</span><span style="display: inline-block;width: 10%;">已收款：<span class="serviceActualPay" id="qian_'+data[i].id+'" style="font-weight: bold;font-size: 18px">' + data[i].serviceActualPay+ '</span></span>' +
                        '<select id="refund" class="refund" name="refund" onchange="gettype(this,'+"'"+data[i].id+"'"+",'"+data[i].serviceActualPay+"'"+')" style="height: 27px;width: 110px;margin-left: 25px;">' +
                        '<option value="2">继续做</option>' +
                        '<option value="1">不做了</option>'+
                        '<option value="3">退项目</option></select>'+
                        '&nbsp&nbsp 退款:' ;
                    if(data[i].checkStatus == '1'){
                        ss +=' <input style="padding-left: 10px;" class="returnMonry" value="0" id="'+data[i].id+'" type="number"  disabled="disabled"/>';
                    }else if(data[i].checkStatus == '2'){
                        ss +=' <input style="padding-left: 10px;" class="returnMonry" value="0" id="'+data[i].id+'" type="number"/>';
                    }
                    ss+= '</div>';
                    sss +=' <div class="data_row" style="margin-top: 18px;margin-bottom: 20px">' +
                        '&nbsp&nbsp' + data[i].department + '&nbsp&nbsp' + data[i].firstLevelProject + '&nbsp&nbsp </div>';
                }
                if ((data[data.length - 1].dealStatus) == "已成交" && (data[data.length - 1].reservationsId) == $("#reservationsId").val()) {
                    str += '<div style="margin-bottom: 20px;"><span style="display: inline-block;width: 10%">门诊：' + data[data.length - 1].outpatientName + '</span><span style="display: inline-block;width: 13%">病历号：'+ data[data.length - 1].medicalRecordNumber +'</span>' +
                        '<span style="display: inline-block;width: 10%">姓名：'+ data[data.length - 1].customerName +'</span><span style="display: inline-block;width: 8%">性别：'+ data[data.length - 1].sex +'</span><span style="display: inline-block;width: 8%">年龄：'+ data[data.length - 1].customerAge +'</span>' +
                        '<span style="display: inline-block;width: 13%">电话：'+ data[data.length - 1].customerPhone +'</span><span>现场TC：'+ data[data.length - 1].fieldTc +'</span></div>';

                    s1 += '<div style="margin-top: 20px;"><span style="display: inline-block;width: 10%">付款 <span style="font-weight: bold;font-size: 18px">' + serviceActualPay2 + '</span>元</span>' +
                        '<span style="display: inline-block;width: 10%">欠款 <span id="payMoneys" style="font-weight: bold;font-size: 18px">' + accountArrears2+ '</span>元</span>' +
                        '<span style="position: absolute;left: 18%;top: 16px;">成交状态：' + data[data.length - 1].dealStatus + '</span></div>';

                    $("div[value='${item.operationTime}']").html(str + ss + s1);
                }
            },
            error: function (data) {
                //<a href=\"javascript:;\" style="color: #d86993;" onclick="payQianKuan(\'' + data[data.length - 1].customerId + '\',\'' + data[data.length - 1].reservationsId + '\',\'' + data[data.length - 1].operationTime +'\')">&nbsp&nbsp;补欠款</a>
                alert('内部故障!');
            }
        });

        //退项目回显项目金额
        function gettype(a,id,serviceActualPay) {
            if (a.value == 3) {
                document.getElementById(id).value = serviceActualPay;
            }
        }
    </script>
    @}
</ul>
@if(isNotEmpty(underline) && underline == 'true'){
<div class="hr-line-dashed"></div>
@}


